<!doctype html>
<html lang="en" xmlns:th=http://www.thymeleaf.org>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Dashboard Template for Bootstrap</title>

    <link rel="canonical" href="https://getbootstrap.com/docs/4.0/examples/dashboard/">

    <!-- Bootstrap core CSS -->
    <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link th:href="@{/css/dashboard.css}" rel="stylesheet">
</head>

<body>
<script language="javascript">
    function addParam()
    {
        var objA=document.getElementById("a1");
        objA.href="/search?search="+document.getElementById("search").value;
    }
</script>
<nav class="navbar navbar-dark sticky-top bg-dark flex-md-nowrap p-0">
    <h5 class="navbar-brand col-sm-3 col-md-2 mr-0" >全球感染新冠人数统计</h5>
    <input class="form-control form-control-dark w-100" type="text" id="search" placeholder="Search" aria-label="Search">
    <ul class="navbar-nav px-3">
        <li class="nav-item text-nowrap">
            <a id="a1" class="nav-link"  th:onclick="addParam()">搜索</a>
        </li>
    </ul>
</nav>

<div class="container-fluid">
    <div class="row">
        <nav class="col-md-2 d-none d-md-block bg-light sidebar">
            <div class="sidebar-sticky">
                <h5 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted">
                    <span>地区</span>
                </h5>
                <ul class="nav flex-column mb-2">
                    <li class="nav-item">
                        <a class="nav-link" th:href="@{/state}">
                            <span data-feather="file-text"></span>
                            地区感染新冠人数统计表
                        </a>
                    </li>
                </ul>
            </div>
        </nav>

        <main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">
            <div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pb-2 mb-3 border-bottom">
                <h1 class="h2">全国感染新冠人数统计表</h1>
            </div>

            <div class="table-responsive">
                <table class="table table-striped table-sm">
                    <thead>
                    <tr>
                        <th>省/洲</th>
                        <th>国家</th>
                        <th>感染新冠病毒总人数</th>
                        <th>较上一日感染人数变化</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr th:each="cvd:${cvds}">
                        <td th:text="${cvd.getState()}"></td>
                        <td th:text="${cvd.getCountry()}"></td>
                        <td th:text="${cvd.getLatestTotalCases()}"></td>
                        <td th:text="${cvd.getDiffFromPrevDay()}"></td>
                    </tr>
                    </tbody>
                </table>
            </div>

        </main>
    </div>
</div>


</body>
</html>